home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / glyphs-x.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-29  |  4.2 KB  |  122 lines

  1. /* X-specific glyphs and related.
  2.    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  3.    Copyright (C) 1995 Board of Trustees, University of Illinois
  4.    Copyright (C) 1995 Ben Wing
  5.  
  6. This file is part of XEmacs.
  7.  
  8. XEmacs is free software; you can redistribute it and/or modify it
  9. under the terms of the GNU General Public License as published by the
  10. Free Software Foundation; either version 2, or (at your option) any
  11. later version.
  12.  
  13. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  14. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16. for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with XEmacs; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. /* Synched up with:  Not in FSF. */
  23.  
  24. #ifndef _XEMACS_GLYPHS_X_H_
  25. #define _XEMACS_GLYPHS_X_H_
  26.  
  27. #include "glyphs.h"
  28.  
  29. #ifdef HAVE_X_WINDOWS
  30.  
  31. #include "xintrinsic.h"
  32. #include "lwlib.h"
  33.  
  34. /****************************************************************************
  35.  *                         Image-Instance Object                            *
  36.  ****************************************************************************/
  37.  
  38. extern int x_valid_image_instantiator_p (Lisp_Object instantiator,
  39.                        int no_error);
  40. extern Lisp_Object x_normalize_image_instantiator (Lisp_Object inst);
  41.  
  42. struct x_image_instance_data
  43. {
  44.   Pixmap pixmap;
  45.   Pixmap mask;
  46.   Cursor cursor;
  47.  
  48.   /* If depth>0, then that means that other colors were allocated when
  49.      this pixmap was loaded.  These are they; we need to free them when
  50.      finalizing the image instance. */
  51.   unsigned long *pixels;
  52.   int npixels;
  53.  
  54.   /* Should we hang on to the extra info from the XpmAttributes, like
  55.      the textual color table and the comments?   Is that useful? */
  56. };
  57.  
  58. #define X_IMAGE_INSTANCE_DATA(i) ((struct x_image_instance_data *) (i)->data)
  59.  
  60. #define IMAGE_INSTANCE_X_PIXMAP(i) (X_IMAGE_INSTANCE_DATA (i)->pixmap)
  61. #define IMAGE_INSTANCE_X_MASK(i) (X_IMAGE_INSTANCE_DATA (i)->mask)
  62. #define IMAGE_INSTANCE_X_CURSOR(i) (X_IMAGE_INSTANCE_DATA (i)->cursor)
  63. #define IMAGE_INSTANCE_X_PIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->pixels)
  64. #define IMAGE_INSTANCE_X_NPIXELS(i) (X_IMAGE_INSTANCE_DATA (i)->npixels)
  65.  
  66. #define XIMAGE_INSTANCE_X_PIXMAP(i) \
  67.   IMAGE_INSTANCE_X_PIXMAP (XIMAGE_INSTANCE (i))
  68. #define XIMAGE_INSTANCE_X_MASK(i) \
  69.   IMAGE_INSTANCE_X_MASK (XIMAGE_INSTANCE (i))
  70. #define XIMAGE_INSTANCE_X_CURSOR(i) \
  71.   IMAGE_INSTANCE_X_CURSOR (XIMAGE_INSTANCE (i))
  72. #define XIMAGE_INSTANCE_X_PIXELS(i) \
  73.   IMAGE_INSTANCE_X_PIXELS (XIMAGE_INSTANCE (i))
  74. #define XIMAGE_INSTANCE_X_NPIXELS(i) \
  75.   IMAGE_INSTANCE_X_NPIXELS (XIMAGE_INSTANCE (i))
  76.  
  77. /****************************************************************************
  78.  *                             Cursor Object                                *
  79.  ****************************************************************************/
  80.  
  81. DECLARE_LRECORD (cursor, struct Lisp_Cursor);
  82. #define XCURSOR(x) XRECORD (x, cursor, struct Lisp_Cursor)
  83. #define XSETCURSOR(x, p) XSETRECORD (x, p, cursor)
  84. #define CURSORP(x) RECORDP (x, cursor)
  85. #define CHECK_CURSOR(x, i) CHECK_RECORD (x, cursor)
  86.  
  87. struct Lisp_Cursor
  88. {
  89.   struct lcrecord_header header;
  90.   Lisp_Object name;
  91.   Lisp_Object device;
  92.  
  93.   Cursor cursor;
  94.   Lisp_Object fg, bg;    /* both Lisp_Color_Instances, or both Qnil */
  95. };
  96.  
  97. /****************************************************************************
  98.  *                            Subwindow Object                              *
  99.  ****************************************************************************/
  100.  
  101. DECLARE_LRECORD (subwindow, struct Lisp_Subwindow);
  102. #define XSUBWINDOW(x) XRECORD (x, subwindow, struct Lisp_Subwindow)
  103. #define XSETSUBWINDOW(x, p) XSETRECORD (x, p, subwindow)
  104. #define SUBWINDOWP(x) RECORDP (x, subwindow)
  105. #define CHECK_SUBWINDOW(x, i) CHECK_RECORD (x, subwindow)
  106.  
  107. struct Lisp_Subwindow
  108. {
  109.   struct lcrecord_header header;
  110.   Lisp_Object frame;
  111.   Screen *xscreen;
  112.   Window parent_window;
  113.  
  114.   unsigned int width, height;
  115.   Window subwindow;
  116.  
  117.   int being_displayed;        /* used to detect when needs to be unmapped */
  118. };
  119.  
  120. #endif /* HAVE_X_WINDOWS */
  121. #endif /* _XEMACS_GLYPHS_X_H_ */
  122.